package com.hist.medical_treatment.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hist.medical_treatment.entity.Invoice;
import com.hist.medical_treatment.service.InvoiceService;
import java.util.List;

@Controller
public class InvoiceController {
      @Autowired
      InvoiceService service;
      
      @ResponseBody
      @RequestMapping("/getInvoice")
      public List<Invoice> getInvoice(){
    	  return service.getInvoice();
      }
      @ResponseBody
      @RequestMapping("/nextInvoice")
      public String nextInvoice(){
    	  return service.nextInvoice();
      }
      
} 
